UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EkqC+LU4UGY+367D//kP3Kl2B6fymzXWd5vIEZR9l64='
WHERE
key_id = '5c6c1abffc9cda1b50a314479628d41068eb8df0447a5108ea32b45a7333d85a'
AND (
token = 'EkqC+LU4UGY+367D//kP3Kl2B6fymzXWd5vIEZR9l64='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)