UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8mtFTcaCFmqlb1EYqR1x0B+neAyEWmFEJ08RDvKPeag='
WHERE
key_id = '529a672a29b6bbd62c3235f5be96be08d8c00738d968c2577fea3588f0204d36'
AND (
token = '8mtFTcaCFmqlb1EYqR1x0B+neAyEWmFEJ08RDvKPeag='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)