UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'F3SeR/OgiyDEVeHDqs5OOqxgFvEbAOHT/oWsS3kD9Bg='
WHERE
key_id = 'e4c808d92314d1c6f1c9596425d4dab4f32894720e65b49c3c35f2101b914694'
AND (
token = 'F3SeR/OgiyDEVeHDqs5OOqxgFvEbAOHT/oWsS3kD9Bg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)