UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Y2Q/FMT1ozyh1aKbhM2ROrS8EsxHEOKS3XJxvj0VKzQ='
WHERE
key_id = '0cb481d2097079a9efbde9f32d30b939f28e04ded39bed6e44150bc8f0df4954'
AND (
token = 'Y2Q/FMT1ozyh1aKbhM2ROrS8EsxHEOKS3XJxvj0VKzQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)