UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+lxu8UFTbB93HnoL5eIfmzBD/Xkb+0QR4vpKL0S97o8='
WHERE
key_id = 'a8718209d2ffe07995f8f9cc9012cff84578a95b5b297766c65051016f224429'
AND (
token = '+lxu8UFTbB93HnoL5eIfmzBD/Xkb+0QR4vpKL0S97o8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)