UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oxxGqCFkogA+nu9ZcGUTWSflJhrk4eFKZX+EDMcClBM='
WHERE
key_id = '27ed17487fb7ddf08326ef10ec36bf9b7c5fc8f0222836f764e768b0dfc1affb'
AND (
token = 'oxxGqCFkogA+nu9ZcGUTWSflJhrk4eFKZX+EDMcClBM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)