UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zOogoaE07JLJ49GJgqV8dvbL7IRbR7gjxaSKC6o++QU='
WHERE
key_id = '2c0f5f490f7e4bd1a8ab693290c0bc3e1d8e0c6b6946ff30e86b3e9751a5234f'
AND (
token = 'zOogoaE07JLJ49GJgqV8dvbL7IRbR7gjxaSKC6o++QU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)