UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ETiqek4xxpQCwwQ1r+NB9gRVDZFA3FYo00K+9oKq2lo='
WHERE
key_id = 'f7634350d5a5dfa43b5c101124d6d0b6980e9b879435aa04872a0f40a336cdaf'
AND (
token = 'ETiqek4xxpQCwwQ1r+NB9gRVDZFA3FYo00K+9oKq2lo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)