UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Vt0a7YiNPMR8uUL2CmLM9B0jHZUF5LbIdMPJAYnH3+g='
WHERE
key_id = '7abc44baf55c4bcd68e0941cd1bcf5eb611133817f79282264f6b43dceb7b101'
AND (
token = 'Vt0a7YiNPMR8uUL2CmLM9B0jHZUF5LbIdMPJAYnH3+g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)