UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AR8fRVVZRsjWu0pt7vI+kf79Y+/zzNXBMUVEzq4zp8c='
WHERE
key_id = '00fbfe81beb8ef8651847b9689c4817dc079aaa8af26df2fc67439f0e487ad6f'
AND (
token = 'AR8fRVVZRsjWu0pt7vI+kf79Y+/zzNXBMUVEzq4zp8c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)