UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MBiSz17TgQl3exI1VJFwk8I4mF4fXIPNwhfZpvYXHUE='
WHERE
key_id = '74e68c930279f74c2d659b587f6019435b30f8f08c455ab5ceadd6e9337c0036'
AND (
token = 'MBiSz17TgQl3exI1VJFwk8I4mF4fXIPNwhfZpvYXHUE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)