UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'v/ZTQPPR6NRzf+fNPO0Ohd2hGbD/jLnxjvjllRvNpBc='
WHERE
key_id = '3307b7e7f72ee6da077f49f15d2604b0ce96ee082c4c39ff3d0279669535c7d2'
AND (
token = 'v/ZTQPPR6NRzf+fNPO0Ohd2hGbD/jLnxjvjllRvNpBc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)