UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'axbWkFrhWOpfG4QoVCwW6VC4TfWxUXOtYhJuRHYw8MY='
WHERE
key_id = '29a6c559eb549da3e2d8247eb68abebb6fea0ffa24e46b4aa2b84996d3c67f28'
AND (
token = 'axbWkFrhWOpfG4QoVCwW6VC4TfWxUXOtYhJuRHYw8MY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)