UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8JXvbe2Ls/dsJihhtyQlEcEuPuAeulJ06EtTqYjm2LQ='
WHERE
key_id = 'b6b4a1ea5c6621412bf677e67dd22e4f4e1afc3b3ad4d7469265a7d60ac036fb'
AND (
token = '8JXvbe2Ls/dsJihhtyQlEcEuPuAeulJ06EtTqYjm2LQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)