UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FcQG73I53cxkPMQGyDfvt4/8WMVRRcsnxKbnzH0XZ8o=' 
WHERE 
  key_id = 'b3eef853edee01544ccf792d42d532c2720f6261cd64e86b6ecdcbbfbb58a3bb' 
  AND (
    token = 'FcQG73I53cxkPMQGyDfvt4/8WMVRRcsnxKbnzH0XZ8o=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031