UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+Hui6EOQtr93XFFfxkKwyaNI5wPTMlrwMvvQFKMZ7J8='
WHERE
key_id = '009ffcfdd1816feb1f1d9dbf62eb09e2eaee0ec7a9b0a0c1f237335e8f0c5f59'
AND (
token = '+Hui6EOQtr93XFFfxkKwyaNI5wPTMlrwMvvQFKMZ7J8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)