UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pIAX2/mUzFlm6dHAdoSk+E1Hh4y66skviL09cb+xOho='
WHERE
key_id = '719efa58ffe2ce09e835779342b4b247970b2520297a0f6f69d60ae2ea30155e'
AND (
token = 'pIAX2/mUzFlm6dHAdoSk+E1Hh4y66skviL09cb+xOho='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)