UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Cx6JTwSXBLkJ5NmdFRnT/k3dVqSLaXTu0CDBcvFnoEo='
WHERE
key_id = '073da2d15e6396aca889e0f3c4761c9ec58620acdb95e6365d4e60d4ae60fff4'
AND (
token = 'Cx6JTwSXBLkJ5NmdFRnT/k3dVqSLaXTu0CDBcvFnoEo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)