UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'L53r+gd2jr+s0yCG1Da5zeJUBwWv8QQJP/xQFrbSsQU='
WHERE
key_id = '1d753a28fc522bb836946f8b439b8f483357e60bda02f23f7da1f77cae30a969'
AND (
token = 'L53r+gd2jr+s0yCG1Da5zeJUBwWv8QQJP/xQFrbSsQU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)