UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'b7r0jiAq3L8YpLO5SAYAD7ubtLpt7RKnR/Aadg4o0kc='
WHERE
key_id = 'd75b40be295940900fb431636c1200ae4d7781008960e2b678499b5d36da4a0d'
AND (
token = 'b7r0jiAq3L8YpLO5SAYAD7ubtLpt7RKnR/Aadg4o0kc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)