UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'skB+CKPI7ZdMrVnIMC2Nm6SK39CyqADw9HGBPBR2mg0='
WHERE
key_id = '188fa127b203b80bed251d026b062c55f2a4c79cb9739d5b5d8d86df0da4156c'
AND (
token = 'skB+CKPI7ZdMrVnIMC2Nm6SK39CyqADw9HGBPBR2mg0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)