UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mfUsfm8/7g17r5XsD1E2GLfza4wgkaw7hlMIAlBd+qQ='
WHERE
key_id = '59ff2330ee7297b52a8cafa1d8b7d04eaead61cd919d8e6c6262f9a024dd185b'
AND (
token = 'mfUsfm8/7g17r5XsD1E2GLfza4wgkaw7hlMIAlBd+qQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)