UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cxEknc8RSpXs82SNOs+VRMNMIwClNdYrT8LXJEUbFlw='
WHERE
key_id = 'd134ef5249226d065193cdd03c17bc5ebfee69e8f010671475db35dea3612933'
AND (
token = 'cxEknc8RSpXs82SNOs+VRMNMIwClNdYrT8LXJEUbFlw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)