UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/SfJvY/kRCXJtJP+Ubk1/sjOJk/2veR8ECtYM40mGHc='
WHERE
key_id = 'c71fd83f9c556b24c83d7199dbb415c8b7b4af0983a554b0e7448543d6f1ebfd'
AND (
token = '/SfJvY/kRCXJtJP+Ubk1/sjOJk/2veR8ECtYM40mGHc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)