UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OvHjg2ph94KtVYEACnfgk6LupMy9WC1hkTbQ1sNKQRs='
WHERE
key_id = '2e0381b740fd154875fb6bb829f9e98968afc4332347a17440fe9875e00d2185'
AND (
token = 'OvHjg2ph94KtVYEACnfgk6LupMy9WC1hkTbQ1sNKQRs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)