UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'F2R+I32ylFs1xGCqbN/1H4/Ude7qlR/Ia9kF6lKBOpw='
WHERE
key_id = '7c2c2f427f8b6172f316fc806cd3ef8f5c51daf188372f0c3d1fff1bc04c9651'
AND (
token = 'F2R+I32ylFs1xGCqbN/1H4/Ude7qlR/Ia9kF6lKBOpw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)