UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Zt+CI6BuvhI9gtTnSRRh1+1QilvR+8OSlg/1ySnOqNI='
WHERE
key_id = 'b2c28266f897cb707d287945b8e443a0f278cf430499d029cc33bb534ac9c421'
AND (
token = 'Zt+CI6BuvhI9gtTnSRRh1+1QilvR+8OSlg/1ySnOqNI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)