UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vbnhF996DXCOvKJEmUItpMxD/NWWXTicSrXAtAyg6og='
WHERE
key_id = '7c385c855d37a2ba434727ebddfc5ad44ab3625ed01a953021e2be65e1c004ae'
AND (
token = 'vbnhF996DXCOvKJEmUItpMxD/NWWXTicSrXAtAyg6og='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)