UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AitRfpVh2NIEPqHwqbkrCiz2PcfQRNzM+fcQq2PiJoI='
WHERE
key_id = '68ea058f00693fbb46a45464be06b73b1a0a3a8177e86b144b1e1775b8edc66b'
AND (
token = 'AitRfpVh2NIEPqHwqbkrCiz2PcfQRNzM+fcQq2PiJoI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)