UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Vzi2WBRP02J0m1ZUsl5fyLGpek0SrWIIR0Tzldlo/6c='
WHERE
key_id = 'ee9fb646d3c47ac0f068377f46e9fc71e443430971144d8e48977443be638d8b'
AND (
token = 'Vzi2WBRP02J0m1ZUsl5fyLGpek0SrWIIR0Tzldlo/6c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)